import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    redirect: '/about',
    component: Home,
    children: [
      {
        path: '/about',
        name: 'About',
        component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
      },
      {
        path: '/twoView',
        name: 'twoView',
        component: () => import(/* webpackChunkName: "about" */ '../views/twoView.vue')
      },
      {
        path: '/oneView',
        name: 'oneView',
        component: () => import(/* webpackChunkName: "about" */ '../views/oneView.vue')
      },
      {
        path: '/threeView',
        name: 'threeView',
        component: () => import(/* webpackChunkName: "about" */ '../views/threeView.vue')
      },
      {
        path: '/fourView',
        name: 'fourView',
        component: () => import(/* webpackChunkName: "about" */ '../views/fourView.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
